Consolidate buffer store translation#7251
Conversation
Added structured buffer support to TranslateStore and used it for all such lowerings.
For raw and typed tests both fcgl and dxilgen
| } | ||
| DXASSERT(MatTy.getLoweredVectorType(false /*MemRepr*/) == val->getType(), | ||
| "helper type should match vectorized matrix"); | ||
| #endif |
There was a problem hiding this comment.
| #endif |
| #ifndef NDEBUG | ||
| HLMatrixType MatTy = HLMatrixType::cast(matType); |
There was a problem hiding this comment.
| #ifndef NDEBUG | |
| HLMatrixType MatTy = HLMatrixType::cast(matType); | |
| [[maybe_unused]] HLMatrixType MatTy = HLMatrixType::cast(matType); |
Response to feedback on debug code
|
As a note for this and the preceding changes to load lowering, I've tested each against the behavior before any of this refactoring took place with the same tests and they pass as well. In a lot of cases, regression tests not failing without the change is bad, but in this case these are intended to be almost 100% NFC, but too involved to feel safe applying that flair. |
| !0 = !{i32 2, !"Debug Info Version", i32 3} | ||
| !1 = !{!"hlsl-hlemit", !"hlsl-hlensure"} | ||
| !2 = !{!"dxc(private) 1.8.0.4820 (longvec_bab_ldst_pr, 243b35785)"} |
There was a problem hiding this comment.
These aren't referenced and can be removed.
Note - The IR parser doesn't care if metadata nodes are contiguous, so you can just remove these and leave the numbers starting at 3 and that's fine. If you do want to renumber everything so that it's prettier, I recommend running the file through opt -S and copy pasting the updated metadata (from !dx.version on) back to this file.
| !98 = !{!99, !99, i64 0} | ||
| !99 = !{!"omnipotent char", !100, i64 0} | ||
| !100 = !{!"Simple C/C++ TBAA"} |
There was a problem hiding this comment.
These TBAA annotations can also be removed.
| !0 = !{i32 2, !"Debug Info Version", i32 3} | ||
| !1 = !{!"hlsl-hlemit", !"hlsl-hlensure"} | ||
| !2 = !{!"dxc(private) 1.8.0.4845 (disable_disble_spirv, 2514104b9-dirty)"} |
| !51 = !{!52, !52, i64 0} | ||
| !52 = !{!"omnipotent char", !53, i64 0} | ||
| !53 = !{!"Simple C/C++ TBAA"} | ||
| !69 = !{!70, !70, i64 0} | ||
| !70 = !{!"double", !52, i64 0} |
llvm-beanz
left a comment
There was a problem hiding this comment.
Feel free to ignore my one nit comment if it is a pain.
| DXASSERT_NOMSG(RK != DxilResource::Kind::StructuredBuffer); | ||
|
|
||
| OP::OpCode opcode = OP::OpCode::NumOpCodes; | ||
| bool isTyped = true; |
There was a problem hiding this comment.
nit: Since this isn't really new, but looks new due to refactoring, feel free to ignore if this is difficult to apply.
| bool isTyped = true; | |
| bool Typed = true; |
https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
Consolidate buffer store translation
Added structured and types buffer support to TranslateStore and used it for all
such lowerings.
Includes IR and fcgl tests for the same in addition to recently added load/store tests that exercise this same code.